#pragma once
#include "../common/CLog.h"
#include "../common/ConfigOpe.h"
#include "../common/LogicBase.h"
#pragma setlocale("chs")


using namespace scriptParse;

class CCtrlUnit
{
public:
	CCtrlUnit(void);
	~CCtrlUnit(void);

	bool Run(OUT bool& isRunning);
	
private:
	bool LoadConfigInfo();
	bool LoadCtrlProtocol();
	bool CreateCtrlThread();
	static int CtrlThread(void* lpVoid);

private:
	CLog myLog;
	GlobalSoftwareInfo mySoftwareInfo;	
	vector <CLogicBase*> logicList;

	map<wstring , wstring> SeqVariables;
};
